package com.smfx.yxt.common.enums;

public enum MimeType {
	
	MIME_TYPE_MAP1("js", "text/javascript"),
    MIME_TYPE_MAP2("png", "image/png"),
    MIME_TYPE_MAP3("jpeg", "image/jpeg"),
    MIME_TYPE_MAP4("jpg", "image/jpeg"),
    MIME_TYPE_MAP5("css", "text/css"),
    MIME_TYPE_MAP6("evy", "application/envoy"),
    MIME_TYPE_MAP7("fif", "application/fractals"),
    MIME_TYPE_MAP8("spl", "application/futuresplash"),
    MIME_TYPE_MAP9("hta", "application/hta"),
    MIME_TYPE_MAP10("acx", "application/internet-property-stream"),
    MIME_TYPE_MAP11("hqx", "application/mac-binhex40"),
    MIME_TYPE_MAP12("doc", "application/msword"),
    MIME_TYPE_MAP13("dot", "application/msword"),
    MIME_TYPE_MAP14("bin", "application/octet-stream"),
    MIME_TYPE_MAP15("class", "application/octet-stream"),
    MIME_TYPE_MAP16("dms", "application/octet-stream"),
    MIME_TYPE_MAP17("exe", "application/octet-stream"),
    MIME_TYPE_MAP18("lha", "application/octet-stream"),
    MIME_TYPE_MAP19("lzh", "application/octet-stream"),
    MIME_TYPE_MAP20("oda", "application/oda"),
    MIME_TYPE_MAP21("axs", "application/olescript"),
    MIME_TYPE_MAP22("pdf", "application/pdf"),
    MIME_TYPE_MAP23("prf", "application/pics-rules"),
    MIME_TYPE_MAP24("p10", "application/pkcs10"),
    MIME_TYPE_MAP25("crl", "application/pkix-crl"),
    MIME_TYPE_MAP26("ai", "application/postscript"),
    MIME_TYPE_MAP27("eps", "application/postscript"),
    MIME_TYPE_MAP28("ps", "application/postscript"),
    MIME_TYPE_MAP29("rtf", "application/rtf"),
    MIME_TYPE_MAP30("setpay", "application/set-payment-initiation"),
    MIME_TYPE_MAP31("setreg", "application/set-registration-initiation"),
    MIME_TYPE_MAP32("xla", "application/vnd.ms-excel"),
    MIME_TYPE_MAP33("xlc", "application/vnd.ms-excel"),
    MIME_TYPE_MAP34("xlm", "application/vnd.ms-excel"),
    MIME_TYPE_MAP35("xls", "application/vnd.ms-excel"),
    MIME_TYPE_MAP355("xlsx", "application/vnd.ms-excel"),
    MIME_TYPE_MAP356("csv", "application/vnd.ms-excel"),
    MIME_TYPE_MAP36("xlt", "application/vnd.ms-excel"),
    MIME_TYPE_MAP37("xlw", "application/vnd.ms-excel"),
    MIME_TYPE_MAP38("msg", "application/vnd.ms-outlook"),
    MIME_TYPE_MAP39("sst", "application/vnd.ms-pkicertstore"),
    MIME_TYPE_MAP40("cat", "application/vnd.ms-pkiseccat"),
    MIME_TYPE_MAP41("stl", "application/vnd.ms-pkistl"),
    MIME_TYPE_MAP42("pot", "application/vnd.ms-powerpoint"),
    MIME_TYPE_MAP43("pps", "application/vnd.ms-powerpoint"),
    MIME_TYPE_MAP44("ppt", "application/vnd.ms-powerpoint"),
    MIME_TYPE_MAP45("mpp", "application/vnd.ms-project"),
    MIME_TYPE_MAP46("wcm", "application/vnd.ms-works"),
    MIME_TYPE_MAP47("wdb", "application/vnd.ms-works"),
    MIME_TYPE_MAP48("wks", "application/vnd.ms-works"),
    MIME_TYPE_MAP49("wps", "application/vnd.ms-works"),
    MIME_TYPE_MAP50("hlp", "application/winhlp"),
    MIME_TYPE_MAP51("bcpio", "application/x-bcpio"),
    MIME_TYPE_MAP52("cdf", "application/x-cdf"),
    MIME_TYPE_MAP53("z", "application/x-compress"),
    MIME_TYPE_MAP54("tgz", "application/x-compressed"),
    MIME_TYPE_MAP55("cpio", "application/x-cpio"),
    MIME_TYPE_MAP56("csh", "application/x-csh"),
    MIME_TYPE_MAP57("dcr", "application/x-director"),
    MIME_TYPE_MAP58("dir", "application/x-director"),
    MIME_TYPE_MAP59("dxr", "application/x-director"),
    MIME_TYPE_MAP60("dvi", "application/x-dvi"),
    MIME_TYPE_MAP61("gtar", "application/x-gtar"),
    MIME_TYPE_MAP62("gz", "application/x-gzip"),
    MIME_TYPE_MAP63("hdf", "application/x-hdf"),
    MIME_TYPE_MAP64("ins", "application/x-internet-signup"),
    MIME_TYPE_MAP65("isp", "application/x-internet-signup"),
    MIME_TYPE_MAP66("iii", "application/x-iphone"),
    MIME_TYPE_MAP67("latex", "application/x-latex"),
    MIME_TYPE_MAP68("mdb", "application/x-msaccess"),
    MIME_TYPE_MAP69("crd", "application/x-mscardfile"),
    MIME_TYPE_MAP70("clp", "application/x-msclip"),
    MIME_TYPE_MAP71("dll", "application/x-msdownload"),
    MIME_TYPE_MAP72("m13", "application/x-msmediaview"),
    MIME_TYPE_MAP73("m14", "application/x-msmediaview"),
    MIME_TYPE_MAP74("mvb", "application/x-msmediaview"),
    MIME_TYPE_MAP75("wmf", "application/x-msmetafile"),
    MIME_TYPE_MAP76("mny", "application/x-msmoney"),
    MIME_TYPE_MAP77("pub", "application/x-mspublisher"),
    MIME_TYPE_MAP78("scd", "application/x-msschedule"),
    MIME_TYPE_MAP79("trm", "application/x-msterminal"),
    MIME_TYPE_MAP80("wri", "application/x-mswrite"),
    MIME_TYPE_MAP81("cdf", "application/x-netcdf"),
    MIME_TYPE_MAP82("nc", "application/x-netcdf"),
    MIME_TYPE_MAP83("pma", "application/x-perfmon"),
    MIME_TYPE_MAP84("pmc", "application/x-perfmon"),
    MIME_TYPE_MAP85("pml", "application/x-perfmon"),
    MIME_TYPE_MAP86("pmr", "application/x-perfmon"),
    MIME_TYPE_MAP87("pmw", "application/x-perfmon"),
    MIME_TYPE_MAP88("p12", "application/x-pkcs12"),
    MIME_TYPE_MAP89("pfx", "application/x-pkcs12"),
    MIME_TYPE_MAP90("p7b", "application/x-pkcs7-certificates"),
    MIME_TYPE_MAP91("spc", "application/x-pkcs7-certificates"),
    MIME_TYPE_MAP92("p7r", "application/x-pkcs7-certreqresp"),
    MIME_TYPE_MAP93("p7c", "application/x-pkcs7-mime"),
    MIME_TYPE_MAP94("p7m", "application/x-pkcs7-mime"),
    MIME_TYPE_MAP95("p7s", "application/x-pkcs7-signature"),
    MIME_TYPE_MAP96("sh", "application/x-sh"),
    MIME_TYPE_MAP97("shar", "application/x-shar"),
    MIME_TYPE_MAP98("swf", "application/x-shockwave-flash"),
    MIME_TYPE_MAP99("sit", "application/x-stuffit"),
    MIME_TYPE_MAP100("sv4cpio", "application/x-sv4cpio"),
    MIME_TYPE_MAP101("sv4crc", "application/x-sv4crc"),
    MIME_TYPE_MAP102("tar", "application/x-tar"),
    MIME_TYPE_MAP103("tcl", "application/x-tcl"),
    MIME_TYPE_MAP104("tex", "application/x-tex"),
    MIME_TYPE_MAP105("texi", "application/x-texinfo"),
    MIME_TYPE_MAP106("texinfo", "application/x-texinfo"),
    MIME_TYPE_MAP107("roff", "application/x-troff"),
    MIME_TYPE_MAP108("t", "application/x-troff"),
    MIME_TYPE_MAP109("tr", "application/x-troff"),
    MIME_TYPE_MAP110("man", "application/x-troff-man"),
    MIME_TYPE_MAP111("me", "application/x-troff-me"),
    MIME_TYPE_MAP112("ms", "application/x-troff-ms"),
    MIME_TYPE_MAP113("ustar", "application/x-ustar"),
    MIME_TYPE_MAP114("src", "application/x-wais-source"),
    MIME_TYPE_MAP115("cer", "application/x-x509-ca-cert"),
    MIME_TYPE_MAP116("crt", "application/x-x509-ca-cert"),
    MIME_TYPE_MAP117("der", "application/x-x509-ca-cert"),
    MIME_TYPE_MAP118("pko", "application/ynd.ms-pkipko"),
    MIME_TYPE_MAP119("zip", "application/zip"),
    MIME_TYPE_MAP120("amr", "audio/amr"),
    MIME_TYPE_MAP121("au", "audio/basic"),
    MIME_TYPE_MAP122("snd", "audio/basic"),
    MIME_TYPE_MAP123("mid", "audio/mid"),
    MIME_TYPE_MAP124("rmi", "audio/mid"),
    MIME_TYPE_MAP125("mp3", "audio/mpeg"),
    MIME_TYPE_MAP126("aif", "audio/x-aiff"),
    MIME_TYPE_MAP127("aifc", "audio/x-aiff"),
    MIME_TYPE_MAP128("aiff", "audio/x-aiff"),
    MIME_TYPE_MAP129("m3u", "audio/x-mpegurl"),
    MIME_TYPE_MAP130("ra", "audio/x-pn-realaudio"),
    MIME_TYPE_MAP131("ram", "audio/x-pn-realaudio"),
    MIME_TYPE_MAP132("wav", "audio/x-wav"),
    MIME_TYPE_MAP133("bmp", "image/bmp"),
    MIME_TYPE_MAP134("cod", "image/cis-cod"),
    MIME_TYPE_MAP135("gif", "image/gif"),
    MIME_TYPE_MAP136("ief", "image/ief"),
    MIME_TYPE_MAP137("jpe", "image/jpeg"),
    MIME_TYPE_MAP138("jfif", "image/pipeg"),
    MIME_TYPE_MAP139("svg", "image/svg+xml"),
    MIME_TYPE_MAP140("tif", "image/tiff"),
    MIME_TYPE_MAP141("tiff", "image/tiff"),
    MIME_TYPE_MAP142("ras", "image/x-cmu-raster"),
    MIME_TYPE_MAP143("cmx", "image/x-cmx"),
    MIME_TYPE_MAP144("ico", "image/x-icon"),
    MIME_TYPE_MAP145("pnm", "image/x-portable-anymap"),
    MIME_TYPE_MAP146("pbm", "image/x-portable-bitmap"),
    MIME_TYPE_MAP147("pgm", "image/x-portable-graymap"),
    MIME_TYPE_MAP148("ppm", "image/x-portable-pixmap"),
    MIME_TYPE_MAP149("rgb", "image/x-rgb"),
    MIME_TYPE_MAP150("xbm", "image/x-xbitmap"),
    MIME_TYPE_MAP151("xpm", "image/x-xpixmap"),
    MIME_TYPE_MAP152("xwd", "image/x-xwindowdump"),
    MIME_TYPE_MAP153("mht", "message/rfc822"),
    MIME_TYPE_MAP154("mhtml", "message/rfc822"),
    MIME_TYPE_MAP155("nws", "message/rfc822"),
    MIME_TYPE_MAP156("323", "text/h323"),
    MIME_TYPE_MAP157("htm", "text/html"),
    MIME_TYPE_MAP158("html", "text/html"),
    MIME_TYPE_MAP159("stm", "text/html"),
    MIME_TYPE_MAP160("uls", "text/iuls"),
    MIME_TYPE_MAP161("bas", "text/plain"),
    MIME_TYPE_MAP162("c", "text/plain"),
    MIME_TYPE_MAP163("h", "text/plain"),
    MIME_TYPE_MAP164("txt", "text/plain"),
    MIME_TYPE_MAP165("rtx", "text/richtext"),
    MIME_TYPE_MAP166("sct", "text/scriptlet"),
    MIME_TYPE_MAP167("tsv", "text/tab-separated-values"),
    MIME_TYPE_MAP168("htt", "text/webviewhtml"),
    MIME_TYPE_MAP169("htc", "text/x-component"),
    MIME_TYPE_MAP170("etx", "text/x-setext"),
    MIME_TYPE_MAP171("vcf", "text/x-vcard"),
    MIME_TYPE_MAP172("mp4", "video/mpeg4"),
    MIME_TYPE_MAP173("mp2", "video/mpeg"),
    MIME_TYPE_MAP174("mpa", "video/mpeg"),
    MIME_TYPE_MAP175("mpe", "video/mpeg"),
    MIME_TYPE_MAP176("mpeg", "video/mpeg"),
    MIME_TYPE_MAP177("mpg", "video/mpeg"),
    MIME_TYPE_MAP178("mpv2", "video/mpeg"),
    MIME_TYPE_MAP179("mov", "video/quicktime"),
    MIME_TYPE_MAP180("qt", "video/quicktime"),
    MIME_TYPE_MAP181("lsf", "video/x-la-asf"),
    MIME_TYPE_MAP182("lsx", "video/x-la-asf"),
    MIME_TYPE_MAP183("asf", "video/x-ms-asf"),
    MIME_TYPE_MAP184("asr", "video/x-ms-asf"),
    MIME_TYPE_MAP185("asx", "video/x-ms-asf"),
    MIME_TYPE_MAP186("avi", "video/x-msvideo"),
    MIME_TYPE_MAP187("movie", "video/x-sgi-movie"),
    MIME_TYPE_MAP188("flr", "x-world/x-vrml"),
    MIME_TYPE_MAP189("vrml", "x-world/x-vrml"),
    MIME_TYPE_MAP190("wrl", "x-world/x-vrml"),
    MIME_TYPE_MAP191("wrz", "x-world/x-vrml"),
    MIME_TYPE_MAP192("xaf", "x-world/x-vrml"),
    MIME_TYPE_MAP193("xof", "x-world/x-vrml");
    
    private final String code;
	
	private final String value;
	
	private MimeType(String code, String value) {
		this.code = code;
		this.value = value;
	}
	
	public static String getKey(String value) {
		for(MimeType type : MimeType.values()) {
			if(type.getValue().equals(value)) {
				return type.getCode();
			}
		}
		return null;
	}
	
	public static String getValue(String key) {
		for(MimeType type : MimeType.values()) {
			if(type.getCode().equals(key)) {
				return type.getValue();
			}
		}
		return null;
	}

	public String getCode() {
		return code;
	}

	public String getValue() {
		return value;
	}

}
